import java.sql.Array;
import java.util.Arrays;
import java.util.Collections;

public class TestVoidMethod {
    public  static void main(String[] args){
        System.out.println(printGrade(102));
    }
    public  static char printGrade(double grade){
        if(grade>100&&grade<0)System.exit(-1);//这句的控制效果没有跳出来
        int [] gradeArray={90,80,70,60};
        int i=0;
        for (int x : gradeArray){
               if (grade>gradeArray[i]){
                   break;
               }
            i++;
           }
        switch (i){
            case 0:
                return 'A';
            case 1:
                return 'B';
            case 2:
                return 'C';
            case 3:
                return 'D';
            default:return 'E';
        }
       }
    }

